package priv.wjh.study.cloud.feign.api.config;

import feign.codec.Decoder;
import feign.codec.Encoder;
import feign.codec.ErrorDecoder;
import org.springframework.context.annotation.Bean;

/**
 * <h1>feign 泛型入参配置</h1>
 *
 * @author wangjunhao
 **/
public class FeignGenericSupportConfig {

    @Bean
    public Encoder encoder() {
        return new GenericSupportEncoder();
    }

    @Bean
    public Decoder decoder() {
        return new MyDecoder();
    }

    @Bean
    public ErrorDecoder errorDecoder() {
        return new FeignErrorDecoder();
    }
}
